{%- if request.path == '/' -%}
  ?return_to=/account
{%- else -%}
  {%- if template.name != '404' and template.name != 'login' and template.name != 'register' and template.suffix != 'reset-password' -%}
  {{ request.path | prepend: '?return_to=' }}
  {%- endif -%}
{%- endif -%}
